home *** CD-ROM | disk | FTP | other *** search
/ Dr. Windows 3 / dr win3.zip / dr win3 / WINPROGS / SPMATE13.ZIP / VBREADME.TX$ / vbreadme.txt
Text File  |  1993-10-01  |  4KB  |  96 lines

  1. SpellMate for Visual Basic.
  2. ===========================
  3.  
  4. The SpellMate library (SPELMATE.DLL) can be used directly from 
  5. Microsoft's Visual Basic with no problems.   Simply include the 
  6. module SpelMate.BAS into your project window and you will have 
  7. access to the SpellMate routines directly or, for a much easier 
  8. life, a set of Visual Basic Subs which provide a simple 
  9. interface to SpellMate.
  10.  
  11. The SpelMate.BAS module contains declarations for the DLL 
  12. routines and some Visual Basic code to allow direct checking of the contents of any TextBox control on a Visual Basic form.   There is no need to access the DLL routines directly at all, unless you wish to provide a more efficient parser than the one supplied in the module.   In fact, SpellMate can be used with only a few lines of code in a Visual Basic program.   There are two example programs on the disk which illustrate the use of SpellMate.
  13.  
  14.     VBSPLMIN.MAK    This is a program which contains the
  15.             absoulte minimum of code needed to 
  16.             use SpellMate.   It's project file             
  17.             includes :-
  18.  
  19.             VBSPELMIN.FRM    The main form.
  20.             SPELMATE.BAS    The SpellMate module.
  21.  
  22.  
  23.     SPELTEST.MAK    This is a program which includes a             
  24.             simple text editor with spell checking
  25.             facilities.   It's project file             
  26.             includes :-
  27.     
  28.  
  29.             SPELMATE.BAS    The SpellMate module.
  30.             GETFILE.FRM    A file load form.
  31.             SAVEFILE.FRM    A file save form.
  32.             SPELTEST.FRM    The main form.
  33.             SPELTEST.BAS    Global variables.
  34.  
  35.  
  36. Using SpellMate from Visual Basic.
  37. ==================================        
  38.  
  39. To use SpellMate from a Visual Basic program, there are a few 
  40. simple requirements.   You must have SPELMATE.DLL, MAINUK.DIC 
  41. and PRIVATE.DIC all in the same directory on your path (e.g. 
  42. the Windows directory).   
  43.  
  44. If you intend to use the DLL routines directly, you need to 
  45. import the Declarations section of SPELMATE.BAS, which informs 
  46. the Visual Basic program of the interface requirements for each 
  47. function.   Call the function as declared.   In particular, you 
  48. must use the SuggestVBWord function rather than the SuggestWord 
  49. function, because the latter does not know about Visual Basic 
  50. strings.   When calling this function, you must send a fixed 
  51. length string as a parameter (e.g. declared as :- 
  52.  
  53.         Dim S As String * NN, 
  54.  
  55. where NN is the number of characters), with at least 20 
  56. characters in it, and the truncate the trailing spaces from it 
  57. when it returns (use Trim$()).   See the contents of 
  58. DoSpellCheck in SPELMATE.BAS for more details.
  59.  
  60. Otherwise, you need to import SPELMATE.BAS by adding it to your 
  61. project window, and have the text to be spell checked in a 
  62. TextBox control which has the HideSelect property set to False. 
  63. To do a spell check, set the text insertion point in the text 
  64. box at the point from which you want to start checking 
  65. (using the SelStart property or moving the cursor manually) 
  66. and then call DoSpellCheck, passing the name of the Text Box 
  67. as a parameter.   e.g. for a form with a TextBox called T :-
  68.  
  69.     '    '    '
  70.     T.Text = "Text to be spell checked."
  71.     T.SelStart = 1
  72.     DoSpellCheck T
  73.  
  74. On return, the Text property of the text box is updated with 
  75. the suggestions which were accepted.
  76.  
  77.  
  78. Have fun using SpellMate,
  79.  
  80.  
  81. Alistair McMonnies,
  82. Lecturer and Developer, 
  83. Microelectronics Educational Development Centre,
  84. University of Paisley
  85. July 1993.
  86.  
  87.  
  88. P.S. Bug Fix...
  89.  
  90.     Version 1 of the SPELMATE.BAS file had a bug which caused 
  91. the program to crash if the spell text in SPELTEST.BAS was done
  92. from the cursor position when the cursor was at the beginning of 
  93. the text file.   This has now been fixed - apologies to all those
  94. who were inconvenienced.   A.McM.
  95.  
  96.